package com.ruoyi.bulkegg.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bulkegg.mapper.OrderFileProcessRecordMapper;
import com.ruoyi.bulkegg.domain.OrderFileProcessRecord;
import com.ruoyi.bulkegg.service.IOrderFileProcessRecordService;
import com.ruoyi.bulkegg.service.ISupplyRelationCompanyService;
import com.ruoyi.bulkegg.domain.SupplyRelationCompany;

/**
 * 供应商订单处理记录Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-28
 */
@Service
@DataSource(DataSourceType.BULKEGG)
public class OrderFileProcessRecordServiceImpl implements IOrderFileProcessRecordService
{
    @Autowired
    private OrderFileProcessRecordMapper orderFileProcessRecordMapper;

    @Autowired
    private ISupplyRelationCompanyService supplyRelationCompanyService;

    /**
     * 查询供应商订单处理记录
     *
     * @param id 供应商订单处理记录主键
     * @return 供应商订单处理记录
     */
    @Override
    public OrderFileProcessRecord selectOrderFileProcessRecordById(Long id)
    {
        return orderFileProcessRecordMapper.selectOrderFileProcessRecordById(id);
    }

    /**
     * 查询供应商订单处理记录列表
     *
     * @param orderFileProcessRecord 供应商订单处理记录
     * @return 供应商订单处理记录
     */
    @Override
    public List<OrderFileProcessRecord> selectOrderFileProcessRecordList(OrderFileProcessRecord orderFileProcessRecord)
    {
        List<OrderFileProcessRecord> list = orderFileProcessRecordMapper.selectOrderFileProcessRecordList(orderFileProcessRecord);
        
        return list;
    }

    /**
     * 新增供应商订单处理记录
     *
     * @param orderFileProcessRecord 供应商订单处理记录
     * @return 结果
     */
    @Override
    public int insertOrderFileProcessRecord(OrderFileProcessRecord orderFileProcessRecord)
    {
        orderFileProcessRecord.setCreateTime(DateUtils.getNowDate());
        return orderFileProcessRecordMapper.insertOrderFileProcessRecord(orderFileProcessRecord);
    }

    /**
     * 修改供应商订单处理记录
     *
     * @param orderFileProcessRecord 供应商订单处理记录
     * @return 结果
     */
    @Override
    public int updateOrderFileProcessRecord(OrderFileProcessRecord orderFileProcessRecord)
    {
        orderFileProcessRecord.setUpdateTime(DateUtils.getNowDate());
        return orderFileProcessRecordMapper.updateOrderFileProcessRecord(orderFileProcessRecord);
    }

    /**
     * 批量删除供应商订单处理记录
     *
     * @param ids 需要删除的供应商订单处理记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderFileProcessRecordByIds(Long[] ids)
    {
        return orderFileProcessRecordMapper.deleteOrderFileProcessRecordByIds(ids);
    }

    /**
     * 删除供应商订单处理记录信息
     *
     * @param id 供应商订单处理记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderFileProcessRecordById(Long id)
    {
        return orderFileProcessRecordMapper.deleteOrderFileProcessRecordById(id);
    }
}
